package com.hxf.dto;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.PolymorphismType;

/**
 * 餐厅详细订单
 * @author tengyicheng
 *
 */
@Entity
@Table(name = "rk_meal_order_detail")
@org.hibernate.annotations.Entity(selectBeforeUpdate = true, dynamicInsert = true, dynamicUpdate = true, polymorphism = PolymorphismType.EXPLICIT)
public class MealOrderDetailDto extends BaseDto {
	private Integer id;
	private String orderId;//订单编号
	private Integer mealMenuId;//菜肴编号
	private Integer quantity;
	private Double discont;//折扣价
	private Integer satuts;//状态
	private String createDate;//创建时间
	private Integer detailType;//0:单菜  1:套餐
	private Double price;// 原价
	private Double preferentialPrice;
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "order_id")
	public String getOrderId() {
		return orderId;
	}
	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	
	@Column(name = "meal_menu_id")
	public Integer getMealMenuId() {
		return mealMenuId;
	}
	public void setMealMenuId(Integer mealMenuId) {
		this.mealMenuId = mealMenuId;
	}
	
	@Column(name = "quantity")
	public Integer getQuantity() {
		return quantity;
	}
	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}
	
	@Column(name = "discont")
	public Double getDiscont() {
		return discont;
	}
	public void setDiscont(Double discont) {
		this.discont = discont;
	}
	
	@Column(name = "status")
	public Integer getSatuts() {
		return satuts;
	}
	public void setSatuts(Integer satuts) {
		this.satuts = satuts;
	}
	
	@Column(name = "create_date")
	public String getCreateDate() {
		return createDate;
	}
	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}
	
	@Column(name = "detail_type")
	public Integer getDetailType() {
		return detailType;
	}
	public void setDetailType(Integer detailType) {
		this.detailType = detailType;
	}
	
	@Column(name = "price")
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	
	@Column(name = "preferential_price")
	public Double getPreferentialPrice() {
		return preferentialPrice;
	}
	public void setPreferentialPrice(Double preferentialPrice) {
		this.preferentialPrice = preferentialPrice;
	}

	@Override
	public String toString() {
		return "MealOrderDetailDto [id=" + id + ", orderId=" + orderId
				+ ", mealMenuId=" + mealMenuId + ", quantity=" + quantity
				+ ", discont=" + discont + ", satuts=" + satuts
				+ ", createDate=" + createDate + ", detailType=" + detailType
				+ ", price=" + price + ", preferentialPrice="
				+ preferentialPrice + "]";
	}
	
	
} 
